This vignette provides an overview of the rTRIPLEXCWFlux
R package functions. We provide a working examples to demonstrates the
basic functionality and use of the package.
The rTRIPLEXCWFlux package integrated the carbon uptake
submodule and evapotranspiration submodule of the
TRIPLEX-CW-Flux model to run the simulation of carbon-water
coupling. In the R script, the user only needs to download and load the
rTRIPLEX-CW-Flux package, and then input the variables and
parameters of the model to obtain simulated results. This package
accelerates the running speed of the model and facilitates the
estimation of carbon sequestration and water consumption in different
forest ecosystems using extensive flux observed data.
To display the basic functionality of rTRIPLEXCWFlux R
package, a simple simulation will be performed using TRIPLEX-CW-Flux
model. The function of run TRIPLEX-CW-Flux from R is
TRIPLEX_CW_Flux. After called, the function will run and
return the charts of simulated result for NEP and ET at 30 min scale,
and monthly variation of the input environmental factors.
Before running the rTRIPLEXCWFlux R package, users need
to prepare the input variables and parameters required by the model, and
check whether the column name is consistent with that in internal data
in advance. You can use data("Inputpara") and
data("Inputvariable") to see the information and format of
input variables and parameters tables, respectively.
In this example, we run a simulation for a Chinese fir plantation.
The input data are provided as internal data in
rTRIPLEXCWFlux.
library(rTRIPLEXCWFlux)
out<-TRIPLEX_CW_Flux (Input_variable=Inputvariable,
Input_parameter=Inputpara)
head(out)
#> DATE Vms Ta RH VPDhpa SVWC30cm Rn PPFD Rainfall Month Day year
#> 1 2019/1/1 0:00 0.2 -1.4 88 0.7 26.70 -0.3 0 0 1 1 2019
#> 2 2019/1/1 0:30 0.3 -1.4 89 0.6 26.70 -0.2 0 0 1 1 2019
#> 3 2019/1/1 1:00 0.6 -1.4 93 0.4 26.70 -0.2 0 0 1 1 2019
#> 4 2019/1/1 1:30 0.5 -1.5 96 0.2 26.75 -0.4 0 0 1 1 2019
#> 5 2019/1/1 2:00 0.7 -1.4 96 0.2 26.80 -0.3 0 0 1 1 2019
#> 6 2019/1/1 2:30 0.6 -1.5 99 0.0 26.80 -0.2 0 0 1 1 2019
#> time DOY Cof G NEE LE season seasonnum
#> 1 0.0 1 389.9701 -31.73333 0.05943252 31.390369 Winter 4
#> 2 0.5 1 389.9273 -31.46667 0.04466091 19.896811 Winter 4
#> 3 1.0 1 391.0606 -31.43333 0.04414407 19.870601 Winter 4
#> 4 1.5 1 391.1129 -31.40000 0.04466091 19.735104 Winter 4
#> 5 2.0 1 391.2121 -31.33333 0.01363915 0.980239 Winter 4
#> 6 2.5 1 390.1345 -31.33333 0.01523203 12.144469 Winter 4
#> ObserveNEE30 OETS NEP30min ETS GPP30min Re30min
#> 1 -0.029175966 0.0225796146 -0.02841504 0.003038809 0 0.02841504
#> 2 -0.021924448 0.0143121074 -0.02841504 0.002373832 0 0.02841504
#> 3 -0.021670725 0.0142932538 -0.02841504 0.001446595 0 0.02841504
#> 4 -0.021924448 0.0141944495 -0.02827368 0.001315828 0 0.02827368
#> 5 -0.006695583 0.0007051022 -0.02841504 0.001058497 0 0.02841504
#> 6 -0.007477542 0.0087348946 -0.02827368 0.000898963 0 0.02827368The output of the TRIPLEX_CW_Flux function are a long
format dataframe and charts of simulated result for net ecosystem
productivity (NEP) and evapotranspiration (ET) at 30 min scale, and
monthly variation of the input environmental factors. The first 18
columns of the dataframe are input variables. The nineteenth and
twentieth columns are season and the number of seasons. The twenty-first
and twenty-second columns are the observed NEP and ET after the
conversion unit. The twenty-third column is the simulated net ecosystem
productivity, the twenty-fourth column is the simulated ET, the
twenty-fifth column is the estimated gross ecosystem productivity, and
the twenty-sixth column is the estimated ecosystem respiration.
i. the graph of Simulated ET results at 30 min scale in four
seasons.
ii. the graph of Simulated NEP results at 30 min scale in
four seasons.
iii. the graph of Simulated NEP and ET at 30 min scale
during whole studied period.
iv. the graph of diurnal dynamics for observed and
simulated NEP at 30 min scale during whole studied period.
v. the graph of diurnal dynamics for observed and
simulated ET at 30 min scale during whole studied period.